let conHeight = window.innerHeight - 70 + 'px'
$('#main').css({ height: conHeight });
$('.logout').on('click', function() {
    $('.fade').modal('show')
})
$('.logout>a').click(function() {
    $('.logout').click()
    return false
})
$('.outlogin').on('click', function() {
    location.href = '../sider_nav/login.html'
})

$('.outlogin').click(function() {
    sessionStorage.removeItem('username')
    sessionStorage.removeItem('userid')
    $.ajax({
        url: '/sider/logout',
        method: 'post'
    })
})

$('.username').text(sessionStorage.getItem('username'))